<?php

    /** 
     * CSV file reader
     * @author anton
     * 
     * 
     */
    class CSVReader
    {
        static function FileToArray($path_to_file, $separator = ';')
        {
            //reads the file
    		@$lines = file($path_to_file);
    		
    		if ($lines === false)
    		{
    			return false;
    		}
    		
    		//parses contents into data array
    		$i = 0;
    		foreach ($lines as $line)
    		{
    			$result[$i] = explode($separator, $line);
    			
    			$i++;
    		}
    		
    		return $result;
        }
    }

?>